package away3d.core.traverse
{

import away3d.core.base.IRenderable ;
import away3d.core.data.RenderableListItem ;
import away3d.entities.Entity ;
import away3d.lights.LightBase ;



/**
 * The EntityCollector class is a traverser for scene partitions that collects all scene graph entities that are
 * considered potientially visible.
 *
 * @see away3d.partition.Partition3D
 * @see away3d.partition.Entity
 */
class ShadowCasterCollector extends EntityCollector
{
    
    
    /**
     * Creates a new EntityCollector object.
     */
    public function new()
    {
        
        _entities = new Vector() ;
        
    }
    
    
    /**
     * @inheritDoc
     */
    override public function applySkyBox( renderable : IRenderable )
    {
        
        
        
    }
    
    
    /**
     * Adds an IRenderable object to the potentially visible objects.
     * @param renderable The IRenderable object to add.
     */
    override public function applyRenderable( renderable : IRenderable )
    {
        
        if( renderable.castsShadows )
        {
            
            _numOpaques++ ;
            
            var item                = _renderableListItemPool.getItem() ;
            item.renderable         = renderable ;
            item.next               = _opaqueRenderableHead ;
            item.zIndex             = renderable.zIndex ;
            item.materialId         = renderable.material._uniqueId ;
            _opaqueRenderableHead   = item ;
            
        }
        
    }
    
    
    /**
     * @inheritDoc
     */
    override public function applyLight( light : LightBase )
    {
        
        
        
    }
    
    
}